
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>1.2.1 准备工作 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="122-cyber-rt-an-zhuang.html" />
    
    
    <link rel="prev" href="../12-cyber-rt-an-zhuang.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../chapter1.html">
            
                <a href="../../chapter1.html">
            
                    
                    第1章 Cyber RT 概述与环境搭建
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../11-cyber-rt-jian-jie.html">
            
                <a href="../11-cyber-rt-jian-jie.html">
            
                    
                    1.1 Cyber RT 简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../12-cyber-rt-an-zhuang.html">
            
                <a href="../12-cyber-rt-an-zhuang.html">
            
                    
                    1.2 Cyber RT 安装
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.2.2.1" data-path="121-zhun-bei-gong-zuo.html">
            
                <a href="121-zhun-bei-gong-zuo.html">
            
                    
                    1.2.1 准备工作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="122-cyber-rt-an-zhuang.html">
            
                <a href="122-cyber-rt-an-zhuang.html">
            
                    
                    1.2.2 Cyber RT 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="123-ce-shi.html">
            
                <a href="123-ce-shi.html">
            
                    
                    1.2.3 测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../14-cyber-rt-ji-cheng-kai-fa-huan-jing-da-jian.html">
            
                <a href="../14-cyber-rt-ji-cheng-kai-fa-huan-jing-da-jian.html">
            
                    
                    1.3 Cyber RT 集成开发环境搭建
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.3.1" data-path="../14-cyber-rt-ji-cheng-kai-fa-huan-jing-da-jian/131-vscode-xia-zai-yu-an-zhuang.html">
            
                <a href="../14-cyber-rt-ji-cheng-kai-fa-huan-jing-da-jian/131-vscode-xia-zai-yu-an-zhuang.html">
            
                    
                    1.3.1 Vscode 下载与安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.2" data-path="../14-cyber-rt-ji-cheng-kai-fa-huan-jing-da-jian/132-vscode-cha-jian-de-an-zhuang-yi-ji-shi-yong.html">
            
                <a href="../14-cyber-rt-ji-cheng-kai-fa-huan-jing-da-jian/132-vscode-cha-jian-de-an-zhuang-yi-ji-shi-yong.html">
            
                    
                    1.3.2 Vscode 插件的安装以及使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../13-cyber-rt-kuai-su-ti-yan.html">
            
                <a href="../13-cyber-rt-kuai-su-ti-yan.html">
            
                    
                    1.4 Cyber RT 快速体验
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.4.1" data-path="../13-cyber-rt-kuai-su-ti-yan/141-cshi-xian-helloworld.html">
            
                <a href="../13-cyber-rt-kuai-su-ti-yan/141-cshi-xian-helloworld.html">
            
                    
                    1.4.1 c++实现HelloWorld
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.2" data-path="../13-cyber-rt-kuai-su-ti-yan/142-pythonshi-xian-helloworld.html">
            
                <a href="../13-cyber-rt-kuai-su-ti-yan/142-pythonshi-xian-helloworld.html">
            
                    
                    1.4.2 Python实现HelloWorld
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../15-zhun-bei-1-bazel.html">
            
                <a href="../15-zhun-bei-1-bazel.html">
            
                    
                    1.5 预备知识——bazel
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.5.1" data-path="../15-zhun-bei-1-bazel/151-bazel-ji-ben-shi-yong-liu-cheng.html">
            
                <a href="../15-zhun-bei-1-bazel/151-bazel-ji-ben-shi-yong-liu-cheng.html">
            
                    
                    1.5.1 Bazel使用之基本流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5.2" data-path="../15-zhun-bei-1-bazel/151-bazel.html">
            
                <a href="../15-zhun-bei-1-bazel/151-bazel.html">
            
                    
                    1.5.2 Bazel使用之库依赖
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../16-ben-zhang-xiao-jie.html">
            
                <a href="../16-ben-zhang-xiao-jie.html">
            
                    
                    1.6 预备知识——protobuf
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.6.1" data-path="../16-ben-zhang-xiao-jie/161-protoshi-yong-zhi-wen-jian-chuang-jian.html">
            
                <a href="../16-ben-zhang-xiao-jie/161-protoshi-yong-zhi-wen-jian-chuang-jian.html">
            
                    
                    1.6.1 proto使用之文件创建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6.2" data-path="../16-ben-zhang-xiao-jie/162-protoshi-yong-zhi-du-xie-cao-zuo.html">
            
                <a href="../16-ben-zhang-xiao-jie/162-protoshi-yong-zhi-du-xie-cao-zuo.html">
            
                    
                    1.6.2 proto读写之C++实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6.3" data-path="../16-ben-zhang-xiao-jie/163-protodu-xie-zhi-python-shi-xian.html">
            
                <a href="../16-ben-zhang-xiao-jie/163-protodu-xie-zhi-python-shi-xian.html">
            
                    
                    1.6.3 proto读写之Python实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../17-ben-zhang-xiao-jie.html">
            
                <a href="../17-ben-zhang-xiao-jie.html">
            
                    
                    1.7 本章小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi.html">
            
                    
                    第2章 Cyber RT 通信机制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/21-hua-ti-tong-xin.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/21-hua-ti-tong-xin.html">
            
                    
                    2.1 话题通信
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/21-hua-ti-tong-xin/211cshi-xian.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/21-hua-ti-tong-xin/211cshi-xian.html">
            
                    
                    2.1.1C++实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.2" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/21-hua-ti-tong-xin/212-pythonshi-xian.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/21-hua-ti-tong-xin/212-pythonshi-xian.html">
            
                    
                    2.1.2 Python实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/22-fu-wu-tong-xin.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/22-fu-wu-tong-xin.html">
            
                    
                    2.2 服务通信
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/22-fu-wu-tong-xin/221-cshi-xian.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/22-fu-wu-tong-xin/221-cshi-xian.html">
            
                    
                    2.2.1 C++实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/22-fu-wu-tong-xin/222-pythonshi-xian.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/22-fu-wu-tong-xin/222-pythonshi-xian.html">
            
                    
                    2.2.2 Python实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/23-can-shu.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/23-can-shu.html">
            
                    
                    2.3 参数
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.3.1" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/23-can-shu/231-cshi-xian.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/23-can-shu/231-cshi-xian.html">
            
                    
                    2.3.1 C++实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.2" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/23-can-shu/232-pythonshi-xian.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/23-can-shu/232-pythonshi-xian.html">
            
                    
                    2.3.2 Python实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian.html">
            
                    
                    2.4 组件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.4.1" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian/241-ji-ben-component-yan-shi.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian/241-ji-ben-component-yan-shi.html">
            
                    
                    2.4.1 通用组件演示(上)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.2" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian/242-ji-ben-zu-jian-yan-793a28-4e0b29.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian/242-ji-ben-zu-jian-yan-793a28-4e0b29.html">
            
                    
                    2.4.2 通用组件演示(下)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.3" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian/242-shi-jian-zu-jian-yan-shi.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/24-zu-jian/242-shi-jian-zu-jian-yan-shi.html">
            
                    
                    2.4.3 定时器组件演示
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/25-ben-zhang-xiao-jie.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/25-ben-zhang-xiao-jie.html">
            
                    
                    2.5 本章小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../di-3-zhang-cyber-rt-kai-fa-gong-ju.html">
            
                <a href="../../di-3-zhang-cyber-rt-kai-fa-gong-ju.html">
            
                    
                    第3章 Cyber RT 开发工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/32-cyberrecorder.html">
            
                <a href="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/32-cyberrecorder.html">
            
                    
                    3.1 cyber record
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/32-cyberrecorder/321-c++-shi-xian.html">
            
                <a href="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/32-cyberrecorder/321-c++-shi-xian.html">
            
                    
                    3.2.1 C++ 实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.2" data-path="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/32-cyberrecorder/332-python-shi-xian.html">
            
                <a href="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/32-cyberrecorder/332-python-shi-xian.html">
            
                    
                    3.3.2 Python 实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/25-chang-yong-ming-ling.html">
            
                <a href="../../di-2-zhang-cyber-rt-tong-xin-ji-zhi/25-chang-yong-ming-ling.html">
            
                    
                    3.2 常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/33-ben-zhang-xiao-jie.html">
            
                <a href="../../di-3-zhang-cyber-rt-kai-fa-gong-ju/33-ben-zhang-xiao-jie.html">
            
                    
                    3.3 本章小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../zi-65993a-chang-yong-api.html">
            
                <a href="../../zi-65993a-chang-yong-api.html">
            
                    
                    第4章 Cyber RT 常用API
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../../zi-65993a-chang-yong-api/1apiwen-dang.html">
            
                <a href="../../zi-65993a-chang-yong-api/1apiwen-dang.html">
            
                    
                    4.1 节点相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../../zi-65993a-chang-yong-api/2shi-jian-xiang-guan-api.html">
            
                <a href="../../zi-65993a-chang-yong-api/2shi-jian-xiang-guan-api.html">
            
                    
                    4.2 话题相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../../zi-65993a-chang-yong-api/3ding-shi-qi-xiang-guan-api.html">
            
                <a href="../../zi-65993a-chang-yong-api/3ding-shi-qi-xiang-guan-api.html">
            
                    
                    4.3 服务相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../../zi-65993a-chang-yong-api/44-can-shu-xiang-guan-api.html">
            
                <a href="../../zi-65993a-chang-yong-api/44-can-shu-xiang-guan-api.html">
            
                    
                    4.4 参数相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../../zi-65993a-chang-yong-api/45-zu-jian-xiang-guan-api.html">
            
                <a href="../../zi-65993a-chang-yong-api/45-zu-jian-xiang-guan-api.html">
            
                    
                    4.5 组件相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../../zi-65993a-chang-yong-api/46-shi-jian-xiang-guan-api.html">
            
                <a href="../../zi-65993a-chang-yong-api/46-shi-jian-xiang-guan-api.html">
            
                    
                    4.6 时间相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../../zi-65993a-chang-yong-api/47-ri-zhi-xiang-guan-api.html">
            
                <a href="../../zi-65993a-chang-yong-api/47-ri-zhi-xiang-guan-api.html">
            
                    
                    4.7 日志相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../../zi-65993a-chang-yong-api/48-record-xiang-guan-api.html">
            
                <a href="../../zi-65993a-chang-yong-api/48-record-xiang-guan-api.html">
            
                    
                    4.8 record 相关API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="../../zi-65993a-chang-yong-api/48-ben-zhang-xiao-jie.html">
            
                <a href="../../zi-65993a-chang-yong-api/48-ben-zhang-xiao-jie.html">
            
                    
                    4.9 本章小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >1.2.1 准备工作</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="121-&#x51C6;&#x5907;&#x5DE5;&#x4F5C;">1.2.1 &#x51C6;&#x5907;&#x5DE5;&#x4F5C;</h3>
<p>&#x5728;&#x6B63;&#x5F0F;&#x5B89;&#x88C5; Apollo &#x6216; CyberRT &#x4E4B;&#x524D;&#xFF0C;&#x9700;&#x8981;&#x5148;&#x51C6;&#x5907;&#x57FA;&#x7840;&#x73AF;&#x5883;&#xFF0C;&#x57FA;&#x7840;&#x73AF;&#x5883;&#x4E3B;&#x8981;&#x5305;&#x542B;&#x5982;&#x4E0B;&#x5185;&#x5BB9;&#xFF1A;</p>
<ol>
<li>&#x5B89;&#x88C5; Ubuntu Linux&#xFF1B;</li>
<li>&#x5B89;&#x88C5; NVIDIA GPU &#x9A71;&#x52A8;&#xFF08;&#x53EF;&#x9009;&#xFF09;&#xFF1B;</li>
<li>&#x5B89;&#x88C5;docker&#xFF1B;</li>
<li>&#x5B89;&#x88C5; NVIDIA Container Toolkit&#x3002;</li>
</ol>
<h4 id="1&#x5B89;&#x88C5;-ubuntu-linux">1.&#x5B89;&#x88C5; Ubuntu Linux</h4>
<p>&#x5F53;&#x524D;&#x8BFE;&#x7A0B;&#x91C7;&#x7528;&#x7684;&#x662F; Apollo 6.0 &#x7248;&#xFF0C;&#x5EFA;&#x8BAE;&#x5BF9;&#x5E94;&#x7684;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x4F7F;&#x7528;ubuntu20.04 &#x6216; ubuntu18.04&#xFF0C;&#x5728;&#x6B64;&#x4E0D;&#x6D89;&#x53CA;ubuntu&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x7684;&#x5B89;&#x88C5;&#xFF0C;&#x5982;&#x6709;&#x9700;&#x8981;&#x53EF;&#x53C2;&#x8003;&#x94FE;&#x63A5;&#xFF1A;<a href="https://www.bilibili.com/video/BV1Ci4y1L7ZZ?p=7" target="_blank">https://www.bilibili.com/video/BV1Ci4y1L7ZZ?p=7</a>&#x3002;</p>
<p>&#x5728;&#x6267;&#x884C;&#x4E0B;&#x4E00;&#x6B65;&#x524D;&#xFF0C;&#x8BF7;&#x5148;&#x66F4;&#x65B0;&#x76F8;&#x5173;&#x8F6F;&#x4EF6;&#xFF0C;&#x547D;&#x4EE4;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code>sudo apt-get update
sudo apt-get upgrade
</code></pre><blockquote>
<p>&#x8017;&#x65F6;&#x8BB0;&#x5F55;&#xFF1A;1.5h~2h</p>
</blockquote>
<h4 id="2&#x5B89;&#x88C5;-nvidia-gpu-&#x9A71;&#x52A8;&#xFF08;&#x53EF;&#x9009;&#xFF09;">2.&#x5B89;&#x88C5; NVIDIA GPU &#x9A71;&#x52A8;&#xFF08;&#x53EF;&#x9009;&#xFF09;</h4>
<p>&#x8F66;&#x4E0A;&#x7684; Apollo &#x8FD0;&#x884C;&#x73AF;&#x5883;&#x9700;&#x8981;&#x4F9D;&#x8D56; NVIDIA GPU &#x9A71;&#x52A8;&#x3002;</p>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5982;&#x679C;&#x60A8;&#x4E0D;&#x9700;&#x8981;&#x8FD0;&#x884C;&#x611F;&#x77E5;&#x6A21;&#x5757;&#xFF0C;&#x53EA;&#x60F3;&#x64AD;&#x653E;&#x6570;&#x636E;&#x5305;&#x4F53;&#x9A8C; Apollo&#xFF0C;&#x5219;&#x4E0D;&#x9700;&#x8981;&#x5B89;&#x88C5; NVIDIA &#x9A71;&#x52A8;&#x3002;</p>
</blockquote>
<p>&#x60A8;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x4E24;&#x79CD;&#x65B9;&#x5F0F;&#x5728; Ubuntu &#x4E0A;&#x8FDB;&#x884C;&#x5B89;&#x88C5;&#xFF1A;</p>
<ul>
<li><p>&#xFF08;&#x63A8;&#x8350;&#xFF09;<code>apt-get</code>&#x547D;&#x4EE4;&#xFF0C;&#x53C2;&#x89C1;<a href="https://github.com/NVIDIA/nvidia-docker/wiki/Frequently-Asked-Questions#how-do-i-install-the-nvidia-driver" target="_blank">How to Install NVIDIA Driver</a>&#x3002;</p>
</li>
<li><p>&#x4F7F;&#x7528;&#x5B98;&#x65B9;<a href="https://www.nvidia.com/en-us/drivers/unix/" target="_blank">runfile</a>&#x3002;</p>
</li>
</ul>
<p>&#x5BF9;&#x4E8E; Ubuntu 18.04+&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x7B80;&#x5355;&#x6267;&#x884C;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x5373;&#x53EF;&#xFF1A;</p>
<pre><code>sudo apt-get update
sudo apt-add-repository multiverse
sudo apt-get update
sudo apt-get install nvidia-driver-455
</code></pre><p>&#x53EF;&#x4EE5;&#x8F93;&#x5165;<code>nvidia-smi</code>&#x6765;&#x6821;&#x9A8C; NVIDIA GPU &#x9A71;&#x52A8;&#x662F;&#x5426;&#x5728;&#x6B63;&#x5E38;&#x8FD0;&#x884C;&#xFF08;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x5728;&#x5B89;&#x88C5;&#x540E;&#x91CD;&#x542F;&#x7CFB;&#x7EDF;&#x4EE5;&#x4F7F;&#x9A71;&#x52A8;&#x751F;&#x6548;&#xFF09;&#x3002;&#x5982;&#x679C;&#x6210;&#x529F;&#xFF0C;&#x5219;&#x4F1A;&#x51FA;&#x73B0;&#x4EE5;&#x4E0B;&#x4FE1;&#x606F;&#xFF1A;</p>
<pre><code>Prompt&gt; nvidia-smi
Mon Jan 25 15:51:08 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.27.04    Driver Version: 460.27.04    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce RTX 3090    On   | 00000000:65:00.0  On |                  N/A |
| 32%   29C    P8    18W / 350W |    682MiB / 24234MiB |      7%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1286      G   /usr/lib/xorg/Xorg                 40MiB |
|    0   N/A  N/A      1517      G   /usr/bin/gnome-shell              120MiB |
|    0   N/A  N/A      1899      G   /usr/lib/xorg/Xorg                342MiB |
|    0   N/A  N/A      2037      G   /usr/bin/gnome-shell               69MiB |
|    0   N/A  N/A      4148      G   ...gAAAAAAAAA --shared-files      105MiB |
+-----------------------------------------------------------------------------+
</code></pre><h4 id="3&#x5B89;&#x88C5;docker">3.&#x5B89;&#x88C5;docker</h4>
<h5 id="31-&#x5B89;&#x88C5;">3.1 &#x5B89;&#x88C5;</h5>
<p>Apollo 6.0+ &#x4F9D;&#x8D56;&#x4E8E; Docker 19.03+&#x3002;&#x5B89;&#x88C5; Docker &#x5F15;&#x64CE;&#xFF0C;&#x53C2;&#x89C1;<a href="https://docs.docker.com/engine/install/ubuntu/" target="_blank">Install Docker Engine on Ubuntu</a>&#x3002;</p>
<p>Ubuntu &#x4E0A;&#x7684; Docker-CE &#x4E5F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; Docker &#x63D0;&#x4F9B;&#x7684;&#x5B98;&#x65B9;&#x811A;&#x672C;&#x5B89;&#x88C5;&#xFF1A;</p>
<pre><code>curl https://get.docker.com | sh
sudo systemctl start docker &amp;&amp; sudo systemctl enable docker
</code></pre><p>&#x6CE8;&#x610F;&#xFF1A;&#x5B89;&#x88C5;&#x65F6;&#xFF0C;&#x53EF;&#x80FD;&#x4F1A;&#x629B;&#x51FA;&#x5F02;&#x5E38;</p>
<p><img src="../../assets/004_&#x5B89;&#x88C5;&#x51C6;&#x5907;&#x5DE5;&#x4F5C;_&#x5F02;&#x5E38;&#x63D0;&#x793A;.PNG" alt=""></p>
<p>&#x76F4;&#x63A5;&#x6839;&#x636E;&#x63D0;&#x793A;&#x8C03;&#x7528; sudo apt install curl &#x5373;&#x53EF;&#x3002;</p>
<blockquote>
<p>&#x8017;&#x65F6;&#x8BB0;&#x5F55;&#xFF1A;10min</p>
</blockquote>
<h5 id="32-&#x6D4B;&#x8BD5;">3.2 &#x6D4B;&#x8BD5;</h5>
<p>&#x6D4B;&#x8BD5;docker&#xFF0C;&#x5728;&#x7EC8;&#x7AEF;&#x4E2D;&#x8F93;&#x5165;&#xFF1A;</p>
<pre><code>sudo docker run hello-world
</code></pre><p>&#x8FD0;&#x884C;&#x7ED3;&#x679C;&#xFF1A;</p>
<p><img src="../../assets/005_&#x5B89;&#x88C5;&#x51C6;&#x5907;&#x5DE5;&#x4F5C;_docker_helloworld.PNG" alt=""></p>
<h5 id="33-&#x4F18;&#x5316;">3.3 &#x4F18;&#x5316;</h5>
<p>&#x5728;&#x4E0A;&#x4E00;&#x6B65;&#x6D4B;&#x8BD5;&#x65F6;&#xFF0C;&#x4F7F;&#x7528;&#x5230;&#x4E86; sudo &#x6743;&#x9650;&#xFF0C;&#x5426;&#x5219;&#xFF0C;&#x53EF;&#x80FD;&#x4F1A;&#x629B;&#x51FA;&#x5F02;&#x5E38;&#xFF0C;&#x6BD4;&#x5982;&#xFF1A;</p>
<p><img src="../../assets/006_&#x5B89;&#x88C5;&#x51C6;&#x5907;&#x5DE5;&#x4F5C;_docker_&#x6743;&#x9650;&#x5F02;&#x5E38;.PNG" alt="">&#x5BF9;&#x6B64;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x8FDB;&#x884C;&#x4F18;&#x5316;&#xFF0C;&#x6DFB;&#x52A0; docker &#x6743;&#x9650;&#x7ED9;&#x5F53;&#x524D;&#x7528;&#x6237;&#xFF0C;&#x4F7F;&#x7528; docker &#x65F6;&#x53EF;&#x4EE5;&#x514D;sudo&#xFF0C;&#x5177;&#x4F53;&#x64CD;&#x4F5C;&#x5982;&#x4E0B;&#xFF1A;</p>
<ol>
<li><p>&#x521B;&#x5EFA;  docker &#x7528;&#x6237;&#x7EC4;</p>
<pre><code>$ sudo groupadd docker
</code></pre></li>
<li><p>&#x6DFB;&#x52A0;&#x5F53;&#x524D;&#x7528;&#x6237;&#x5230; docker &#x7EC4;</p>
<pre><code>$ sudo usermod -aG docker $USER
</code></pre></li>
<li><p>&#x91CD;&#x542F;&#x865A;&#x62DF;&#x673A;&#x6216;&#x8005;&#x6267;&#x884C;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x4F7F;&#x4E4B;&#x751F;&#x6548;&#xFF08;&#x8981;&#x91CD;&#x542F;&#xFF09;</p>
<pre><code>$ newgrp docker
</code></pre></li>
<li><p>&#x6D4B;&#x8BD5;&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x514D;sudo&#x8FD0;&#x884C;</p>
<pre><code>$ docker run hello-world
</code></pre></li>
</ol>
<p>&#x53E6;&#x5916;&#xFF0C;&#x6211;&#x4EEC;&#x8FD8;&#x53EF;&#x4EE5;&#x914D;&#x7F6E;docker&#x5F00;&#x673A;&#x81EA;&#x542F;&#x52A8;&#xFF0C;&#x6267;&#x884C;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code>$ sudo systemctl enable docker.service
$ sudo systemctl enable containerd.service
</code></pre><h4 id="14&#x5B89;&#x88C5;-nvidia-container-toolkit">1.4&#x5B89;&#x88C5; NVIDIA Container Toolkit</h4>
<p>&#x57FA;&#x4E8E; Apollo &#x7684; CUDA &#x7684; docker &#x955C;&#x50CF;&#x9700;&#x8981;&#x4F9D;&#x8D56;&#x4E8E; NVIDIA Container Toolkit&#x3002;&#x8FD0;&#x884C;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x5B89;&#x88C5; NVIDIA Container Toolkit&#xFF1A;</p>
<pre><code>distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get -y update
sudo apt-get install -y nvidia-docker2
</code></pre><blockquote>
<p>&#x8017;&#x65F6;&#x7EDF;&#x8BA1;&#xFF1A; &#x6BD4;&#x8F83;&#x5FEB;&#x3002;</p>
</blockquote>
<p>&#x5B89;&#x88C5;&#x5B8C;&#x6210;&#x540E;&#xFF0C;&#x91CD;&#x542F; Docker &#x4EE5;&#x4F7F;&#x6539;&#x52A8;&#x751F;&#x6548;&#x3002;</p>
<pre><code>sudo systemctl restart docker
</code></pre><hr>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../12-cyber-rt-an-zhuang.html" class="navigation navigation-prev " aria-label="Previous page: 1.2 Cyber RT 安装">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="122-cyber-rt-an-zhuang.html" class="navigation navigation-next " aria-label="Next page: 1.2.2 Cyber RT 安装">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"1.2.1 准备工作","level":"1.2.2.1","depth":3,"next":{"title":"1.2.2 Cyber RT 安装","level":"1.2.2.2","depth":3,"path":"chapter1/12-cyber-rt-an-zhuang/122-cyber-rt-an-zhuang.md","ref":"chapter1/12-cyber-rt-an-zhuang/122-cyber-rt-an-zhuang.md","articles":[]},"previous":{"title":"1.2 Cyber RT 安装","level":"1.2.2","depth":2,"path":"chapter1/12-cyber-rt-an-zhuang.md","ref":"chapter1/12-cyber-rt-an-zhuang.md","articles":[{"title":"1.2.1 准备工作","level":"1.2.2.1","depth":3,"path":"chapter1/12-cyber-rt-an-zhuang/121-zhun-bei-gong-zuo.md","ref":"chapter1/12-cyber-rt-an-zhuang/121-zhun-bei-gong-zuo.md","articles":[]},{"title":"1.2.2 Cyber RT 安装","level":"1.2.2.2","depth":3,"path":"chapter1/12-cyber-rt-an-zhuang/122-cyber-rt-an-zhuang.md","ref":"chapter1/12-cyber-rt-an-zhuang/122-cyber-rt-an-zhuang.md","articles":[]},{"title":"1.2.3 测试","level":"1.2.2.3","depth":3,"path":"chapter1/12-cyber-rt-an-zhuang/123-ce-shi.md","ref":"chapter1/12-cyber-rt-an-zhuang/123-ce-shi.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["expandable-chapters"],"pluginsConfig":{"expandable-chapters":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"chapter1/12-cyber-rt-an-zhuang/121-zhun-bei-gong-zuo.md","mtime":"2022-03-26T14:59:55.346Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-04-10T10:28:55.066Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

